package com.itheima.springbootwebbtalis.controller;

import com.itheima.springbootwebbtalis.pojo.LogQueryParam;
import com.itheima.springbootwebbtalis.pojo.PageResult;
import com.itheima.springbootwebbtalis.pojo.Result;
import com.itheima.springbootwebbtalis.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController

public class LogController {
    @Autowired
    private LogService logService;
    // 日志列表查询
    @GetMapping("/log/page")
    public Result logShow(LogQueryParam param){
        log.info("日志列表查询参数：{}",param);
        PageResult page =logService.page(param);

        return Result.success(page);
    }
}
